{layout name="common/layout" /}

<div class="container" id="content-container">

    <div class="row">

        <main class="col-md-8">
            <div class="panel panel-default article-content">
                <div class="panel-heading">
                    <ol class="breadcrumb">
                        <!-- S 面包屑导航 -->
                        {cms:breadcrumb id="item"}
                        <li><a href="{$item.url}">{$item.name}</a></li>
                        {/cms:breadcrumb}
                        <!-- E 面包屑导航 -->
                    </ol>
                </div>
                <div class="panel-body">
                    <div class="article-metas">
                        <h1 class="metas-title" {if $__ARCHIVES__.style}style="{$__ARCHIVES__.style_text}"{/if}>
                            {cms:archives name="title" /}
                        </h1>
                        <!-- S 标题区域 -->
                        <div class="metas-body">
                            <span class="views-num">
                                <i class="fa fa-eye"></i> {cms:archives name="views" /} 阅读
                            </span>
                            <span class="comment-num">
                                <i class="fa fa-comments"></i> {cms:archives name="comments" /} 评论
                            </span>
                            <span class="like-num">
                                <i class="fa fa-thumbs-o-up"></i>
                                <span class="js-like-num"> {cms:archives name="likes" /} 点赞
                                </span>
                            </span>
                        </div>
                        <!-- E 标题区域 -->
                    </div>

                    <div class="article-text">
                        <!-- S 正文 -->
                        <p>
                            {if $__ARCHIVES__.is_paid_part_of_content || $__ARCHIVES__.ispaid}
                            {cms:archives name="content" /}
                            {/if}
                        </p>
                        <!-- E 正文 -->
                    </div>

                    {include file="common/payment" /}

                    {include file="common/donate" /}

                    {include file="common/share" type="archives" image="__ARCHIVES__.image" aid="__ARCHIVES__.id"}

                    {include file="common/metainfo" /}

                    {include file="common/related" /}

                    <div class="clearfix"></div>
                </div>
            </div>

            <div class="panel panel-default" id="comments">
                <div class="panel-heading">
                    <h3 class="panel-title">{:__('Comment list')}
                        <small>共有 <span>{cms:archives name="comments" /}</span> 条评论</small>
                    </h3>
                </div>
                <div class="panel-body">
                    {if $__ARCHIVES__.iscomment}
                    {include file="common/comment" type="archives" aid="__ARCHIVES__.id"}
                    {else/}
                    <div class="text-muted text-center">评论功能已关闭</div>
                    {/if}
                </div>
            </div>

        </main>

        <aside class="col-xs-12 col-sm-4">
            {if $config['userpage']}
            <!-- S 关于作者 -->
            <div class="panel panel-default about-author" data-id="{$__ARCHIVES__.user.id}" itemProp="author" itemscope="" itemType="http://schema.org/Person">
                <meta itemProp="name" content="{$__ARCHIVES__.user.nickname}"/>
                <meta itemProp="image" content="{$__ARCHIVES__.user.avatar|cdnurl}"/>
                <meta itemProp="url" content="{$__ARCHIVES__.user.url}"/>
                <div class="panel-heading">
                    <h3 class="panel-title">关于作者</h3>
                </div>
                <div class="panel-body">
                    <div class="media">
                        <div class="media-left">
                            <a href="{$__ARCHIVES__.user.url}">
                                <img class="media-object img-circle img-medium" style="width:64px;height:64px;" src="{$__ARCHIVES__.user.avatar|cdnurl}"
                                     data-holder-rendered="true">
                            </a>
                        </div>
                        <div class="media-body">
                            <h3 style="margin-top:10px;" class="media-heading">
                                <a href="{$__ARCHIVES__.user.url}">{$__ARCHIVES__.user.nickname}</a>
                            </h3>
                            {$__ARCHIVES__.user.bio|default="这家伙很懒，什么也没写！"}
                        </div>
                    </div>
                </div>
            </div>
            <!-- E 关于作者 -->
            {/if}
            {include file="common/sidebar" /}
        </aside>
    </div>
</div>
